package BookTest;

public class A2ExchangeElement {
    public static void main(String[] args) {
        int[] a = {1,3,5,7};
            int temp = a[0];
            int temp1=a[1];
            a[0]=a[2];
            a[1]=a[3];
            a[2]=temp;
            a[3]=temp1;
            System.out.print("交换后的数组为：");
          for(int i=0;i<a.length;i++){
              int b = a[i];
              System.out.print(b+" ");
          }


    }
}
